package com.yanzhen.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yanzhen.model.LeaveInfo;
import com.yanzhen.model.Log;
import com.yanzhen.dao.LogMapper;
import com.yanzhen.service.LogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 系统日志 服务实现类
 * </p>
 *
 * @author 王文龙
 * @since 2023-05-09
 */
@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, Log> implements LogService {

    @Autowired
    private LogMapper logDao;

    @Override
    public PageInfo<Log> queryLogList(int page, int pageSize, Log log) {
        PageHelper.startPage(page,pageSize);
        //获取查询到的结果集合
        List<Log> logList=logDao.queryLogAll(log);
        PageInfo<Log> pageInfo=new PageInfo<>(logList);

        return pageInfo;
    }
}
